package com.bdv.md.controller.xmlattribute;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;

@XmlAccessorType(XmlAccessType.FIELD)
public class Parameter {
	// SMS PARAM START
//	@XmlElement(name="Sender")
//	private String sender;
//	@XmlElement(name="CustomerNumber")
//	private String customerNumber;
//	@XmlElement(name="Password")
//	private String password;
	// SMS PARAM END
	
	// COMMON PARAM START
	@XmlElement(name="TrxID")
	private String trxId;
	@XmlElement(name="AccessCode")
	private String accessCode;
	@XmlElement(name="UtilityCode")
	private String utilityCode;
	@XmlElement(name="MSISDN")
	private String meterNumber;
	@XmlElement(name="MeterID")
	private String meterID;
	@XmlElement(name="Balance")
	private String balanceKWH;
	// COMMON PARAM END
	
	// TOKEN PARAM START [REQ & RESP]
	@XmlElement(name="TokenNumber")
	private String tokenNumber;
	@XmlElement(name="TopupStatus")
	private String suksesStatus;
	@XmlElement(name="TokenType")
	private String jenisToken;
	@XmlElement(name="PaymentMode")
	private String paymentMode;
	// TOKEN PARAM END
	
	// AMR PARAM START [REQ & RESP]
	@XmlElement(name="Usage")
	private String totalUsage;
	@XmlElement(name="Voltage")
	private String voltageRST;
	@XmlElement(name="Current")
	private String arusRST;
	@XmlElement(name="PowerFactor")
	private String powerFactor;
	@XmlElement(name="DayaInstan")
	private String dayaInstant;
	@XmlElement(name="Tarif")
	private String tarifIndex;
	@XmlElement(name="Tamper")
	private String statusTamper;
	@XmlElement(name="PowerOff")
	private String totalOff;
	@XmlElement(name="Credit")
	private String prediksiKreditHabis;
	@XmlElement(name="Payment")
	private String paymentModeMeterType;
	@XmlElement(name="Sudut")
	private String sudutIV;
	@XmlElement(name="Firmware")
	private String firmware;
	// ARM PARAM END
	
	// ALERT PARAM START
	@XmlElement(name="BalanceAlert")
	private String alertLBKWH;
	@XmlElement(name="TokenAlert")
	private String alertIT;
	@XmlElement(name="TokenValue")
	private String nilaiToken;
	@XmlElement(name="TypeAlert")
	private String alertType;
	@XmlElement(name="PowerStatus")
	private String powerStatus;
	// ALERT PARAM END
	
	// CREDIT LIMIT PARAM START
	@XmlElement(name="CreditLimit")
	private String limitKredit;
	@XmlElement(name="AlarmLoop")
	private String pengulanganAlarm;
	// CREDIT LIMIT PARAM END
	
	// HISTORY TOKEN START
	@XmlElement(name="TokenHistory")
	private String token1to5;
	// HISTORY TOKEN END

	// HISTORY BILLING START
	@XmlElement(name="BillingHistory")
	private String ne1to5;
	@XmlElement(name="PowerHistory")
	private String rp1to5;
	// HISTORY BILLING END
	
	// RESPONSE STATUS
	@XmlElement(name="Status")
	private String responseStatus;
	
	// Data Protocol for Post Paid
	@XmlElement(name="HexaMsg")
	private String hexaMsg;
	@XmlElement(name="Status")
	private String status;
	@XmlElement(name="Remote")
	private String remote;
	
	public Parameter(){}
	
	
	
	public Parameter(String trxId, String responseStatus) {
		this.trxId = trxId;
		this.responseStatus = responseStatus;
	}



	/**
	 * Constructor for Set Limit Kredit that will be sent to USSD/MD
	 * @param trxId : Transaction ID from MGT
	 * @param accessCode : access code ConstantValues.NO_AKSES
	 * @param utilityCode : Tipe PU
	 * @param msisdn : Meter Number or MSISDN
	 * @param meterID : ID Meter
	 * @param limitKredit - Limit Kredit yang akan menjadi alert
	 * @param pengulanganAlarm - ???
	 */
	public Parameter(String trxId, String accessCode, String utilityCode,
			String msisdn, String meterID,String limitKredit, String pengulanganAlarm) {
		this.trxId = trxId;
		this.accessCode = accessCode;
		this.utilityCode = utilityCode;
		this.meterNumber = msisdn;
		this.meterID = meterID;
		this.limitKredit = limitKredit;
		this.pengulanganAlarm = pengulanganAlarm;
	}

	/**
	 * Constructor for token request that will be sent to USSD
	 * @param trxId : Transaction ID from MGT
	 * @param accessCode : access code ConstantValues.NO_AKSES
	 * @param utilityCode : Tipe PU
	 * @param msisdn : Meter Number or MSISDN
	 * @param meterID : ID Meter
	 * @param tokenNumber : Nomor Token
	 */
	public Parameter(String trxId, String accessCode, String utilityCode,
			String msisdn, String meterID, String tokenNumber) {
		this.trxId = trxId;
		this.accessCode = accessCode;
		this.utilityCode = utilityCode;
		this.meterNumber = msisdn;
		this.meterID = meterID;
		this.tokenNumber = tokenNumber;
	}
	
	/**
	 * GENERAL CONSTRUCTOR
	 * SPECIFIC : Constructor for Meter Request that will be sent to USSD
	 * @param trxId : Transaction ID from MGT
	 * @param accessCode : access code ConstantValues.NO_AKSES
	 * @param utilityCode : Tipe PU
	 * @param msisdn : Meter Number or MSISDN
	 * @param meterID : ID Meter
	 */
	public Parameter(String trxId, String accessCode, String utilityCode, String msisdn,
			String meterID) {
		this.trxId = trxId;
		this.accessCode = accessCode;
		this.utilityCode = utilityCode;
		this.meterNumber = msisdn;
		this.meterID = meterID;
	}
	
	
	/**
	 * Constructor for Token Response that will be sent from USSD to MD
	 * @param trxId : Transaction ID from MGT
	 * @param accessCode : access code ConstantValues.NO_AKSES
	 * @param utilityCode : Tipe PU
	 * @param msisdn : Meter Number or MSISDN
	 * @param meterID : ID Meter
	 * @param balanceKWH
	 * @param suksesStatus
	 * @param jenisToken
	 * @param paymentMode
	 */
	public Parameter(String trxId, String accessCode, String utilityCode,
			String meterNumber, String meterID, String balanceKWH,
			String suksesStatus, String jenisToken, String paymentMode) {
		this.trxId = trxId;
		this.accessCode = accessCode;
		this.utilityCode = utilityCode;
		this.meterNumber = meterNumber;
		this.meterID = meterID;
		this.balanceKWH = balanceKWH;
		this.suksesStatus = suksesStatus;
		this.jenisToken = jenisToken;
		this.paymentMode = paymentMode;
	}
	
	
	/**
	 * Constructor for AMR Response that will be sent from USSD to MD
	 * @param trxId : Transaction ID from MGT
	 * @param accessCode : access code ConstantValues.NO_AKSES
	 * @param utilityCode : Tipe PU
	 * @param msisdn : Meter Number or MSISDN
	 * @param meterID : ID Meter
	 * @param balanceKWH
	 * @param totalUsage
	 * @param voltageRST
	 * @param arusRST
	 * @param powerFactor
	 * @param dayaInstant
	 * @param tarifIndex
	 * @param statusTamper
	 * @param totalOff
	 * @param prediksiKreditHabis
	 * @param paymentModeMeterType
	 * @param sudutIV
	 * @param firmware
	 */
	public Parameter(String trxId, String accessCode, String utilityCode,
			String meterNumber, String meterID, String balanceKWH,
			String totalUsage, String voltageRST, String arusRST,
			String powerFactor, String dayaInstant, String tarifIndex,
			String statusTamper, String totalOff, String prediksiKreditHabis,
			String paymentModeMeterType, String sudutIV, String firmware) {
		this.trxId = trxId;
		this.accessCode = accessCode;
		this.utilityCode = utilityCode;
		this.meterNumber = meterNumber;
		this.meterID = meterID;
		this.balanceKWH = balanceKWH;
		this.totalUsage = totalUsage;
		this.voltageRST = voltageRST;
		this.arusRST = arusRST;
		this.powerFactor = powerFactor;
		this.dayaInstant = dayaInstant;
		this.tarifIndex = tarifIndex;
		this.statusTamper = statusTamper;
		this.totalOff = totalOff;
		this.prediksiKreditHabis = prediksiKreditHabis;
		this.paymentModeMeterType = paymentModeMeterType;
		this.sudutIV = sudutIV;
		this.firmware = firmware;
	}

	public String getTrxId() {
		return trxId;
	}
	public void setTrxId(String trxId) {
		this.trxId = trxId;
	}
	public String getAccessCode() {
		return accessCode;
	}
	public void setAccessCode(String accessCode) {
		this.accessCode = accessCode;
	}
	public String getUtilityCode() {
		return utilityCode;
	}
	public void setUtilityCode(String utilityCode) {
		this.utilityCode = utilityCode;
	}
	/**
	 * get the MSISDN Number
	 */
	public String getMeterNumber() {
		return meterNumber;
	}
	/**
	 * set the MSISDN Number
	 */
	public void setMeterNumber(String meterNumber) {
		this.meterNumber = meterNumber;
	}
	/**
	 * get the Meter ID Number
	 */
	public String getMeterID() {
		return meterID;
	}
	/**
	 * set the Meter ID Number
	 */
	public void setMeterID(String meterID) {
		this.meterID = meterID;
	}
	public String getTokenNumber() {
		return tokenNumber;
	}
	public void setTokenNumber(String tokenNumber) {
		this.tokenNumber = tokenNumber;
	}
	
	
	public String getResponseStatus() {
		return responseStatus;
	}

	public void setResponseStatus(String responseStatus) {
		this.responseStatus = responseStatus;
	}

	public String getSuksesStatus() {
		return suksesStatus;
	}

	public void setSuksesStatus(String suksesStatus) {
		this.suksesStatus = suksesStatus;
	}

	public String getJenisToken() {
		return jenisToken;
	}

	public void setJenisToken(String jenisToken) {
		this.jenisToken = jenisToken;
	}

	public String getBalanceKWH() {
		return balanceKWH;
	}

	public void setBalanceKWH(String balanceKWH) {
		this.balanceKWH = balanceKWH;
	}

	public String getPaymentMode() {
		return paymentMode;
	}

	public void setPaymentMode(String paymentMode) {
		this.paymentMode = paymentMode;
	}

	public String getTotalUsage() {
		return totalUsage;
	}

	public void setTotalUsage(String totalUsage) {
		this.totalUsage = totalUsage;
	}

	public String getVoltageRST() {
		return voltageRST;
	}

	public void setVoltageRST(String voltageRST) {
		this.voltageRST = voltageRST;
	}

	public String getArusRST() {
		return arusRST;
	}

	public void setArusRST(String arusRST) {
		this.arusRST = arusRST;
	}

	public String getPowerFactor() {
		return powerFactor;
	}

	public void setPowerFactor(String powerFactor) {
		this.powerFactor = powerFactor;
	}

	public String getDayaInstant() {
		return dayaInstant;
	}

	public void setDayaInstant(String dayaInstant) {
		this.dayaInstant = dayaInstant;
	}

	public String getTarifIndex() {
		return tarifIndex;
	}

	public void setTarifIndex(String tarifIndex) {
		this.tarifIndex = tarifIndex;
	}

	public String getStatusTamper() {
		return statusTamper;
	}

	public void setStatusTamper(String statusTamper) {
		this.statusTamper = statusTamper;
	}

	public String getTotalOff() {
		return totalOff;
	}

	public void setTotalOff(String totalOff) {
		this.totalOff = totalOff;
	}

	public String getPrediksiKreditHabis() {
		return prediksiKreditHabis;
	}

	public void setPrediksiKreditHabis(String prediksiKreditHabis) {
		this.prediksiKreditHabis = prediksiKreditHabis;
	}

	public String getPaymentModeMeterType() {
		return paymentModeMeterType;
	}

	public void setPaymentModeMeterType(String paymentModeMeterType) {
		this.paymentModeMeterType = paymentModeMeterType;
	}

	public String getSudutIV() {
		return sudutIV;
	}

	public void setSudutIV(String sudutIV) {
		this.sudutIV = sudutIV;
	}

	public String getFirmware() {
		return firmware;
	}

	public void setFirmware(String firmware) {
		this.firmware = firmware;
	}

	public String getAlertLBKWH() {
		return alertLBKWH;
	}

	public void setAlertLBKWH(String alertLBKWH) {
		this.alertLBKWH = alertLBKWH;
	}

	public String getAlertIT() {
		return alertIT;
	}

	public void setAlertIT(String alertIT) {
		this.alertIT = alertIT;
	}

	public String getNilaiToken() {
		return nilaiToken;
	}

	public void setNilaiToken(String nilaiToken) {
		this.nilaiToken = nilaiToken;
	}

	public String getAlertType() {
		return alertType;
	}

	public void setAlertType(String alertType) {
		this.alertType = alertType;
	}

	public String getPowerStatus() {
		return powerStatus;
	}

	public void setPowerStatus(String powerStatus) {
		this.powerStatus = powerStatus;
	}

	public String getLimitKredit() {
		return limitKredit;
	}

	public void setLimitKredit(String limitKredit) {
		this.limitKredit = limitKredit;
	}

	public String getPengulanganAlarm() {
		return pengulanganAlarm;
	}

	public void setPengulanganAlarm(String pengulanganAlarm) {
		this.pengulanganAlarm = pengulanganAlarm;
	}

	public String getToken1to5() {
		return token1to5;
	}

	public void setToken1to5(String token1to5) {
		this.token1to5 = token1to5;
	}

	public String getNe1to5() {
		return ne1to5;
	}

	public void setNe1to5(String ne1to5) {
		this.ne1to5 = ne1to5;
	}

	public String getRp1to5() {
		return rp1to5;
	}

	public void setRp1to5(String rp1to5) {
		this.rp1to5 = rp1to5;
	}


	public String getHexaMsg() {
		return hexaMsg;
	}



	public void setHexaMsg(String hexaMsg) {
		this.hexaMsg = hexaMsg;
	}

	public String getStatus() {
		return status;
	}



	public void setStatus(String status) {
		this.status = status;
	}



	public String getRemote() {
		return remote;
	}



	public void setRemote(String remote) {
		this.remote = remote;
	}



	@Override
	public String toString() {
		return "Parameter ["
				+ (trxId != null ? "trxId=" + trxId + ", " : "")
				+ (accessCode != null ? "accessCode=" + accessCode + ", " : "")
				+ (utilityCode != null ? "utilityCode=" + utilityCode + ", "
						: "")
				+ (meterNumber != null ? "meterNumber=" + meterNumber + ", "
						: "")
				+ (meterID != null ? "meterID=" + meterID + ", " : "")
				+ (balanceKWH != null ? "balanceKWH=" + balanceKWH + ", " : "")
				+ (tokenNumber != null ? "tokenNumber=" + tokenNumber + ", "
						: "")
				+ (suksesStatus != null ? "suksesStatus=" + suksesStatus + ", "
						: "")
				+ (jenisToken != null ? "jenisToken=" + jenisToken + ", " : "")
				+ (paymentMode != null ? "paymentMode=" + paymentMode + ", "
						: "")
				+ (totalUsage != null ? "totalUsage=" + totalUsage + ", " : "")
				+ (voltageRST != null ? "voltageRST=" + voltageRST + ", " : "")
				+ (arusRST != null ? "arusRST=" + arusRST + ", " : "")
				+ (powerFactor != null ? "powerFactor=" + powerFactor + ", "
						: "")
				+ (dayaInstant != null ? "dayaInstant=" + dayaInstant + ", "
						: "")
				+ (tarifIndex != null ? "tarifIndex=" + tarifIndex + ", " : "")
				+ (statusTamper != null ? "statusTamper=" + statusTamper + ", "
						: "")
				+ (totalOff != null ? "totalOff=" + totalOff + ", " : "")
				+ (prediksiKreditHabis != null ? "prediksiKreditHabis="
						+ prediksiKreditHabis + ", " : "")
				+ (paymentModeMeterType != null ? "paymentModeMeterType="
						+ paymentModeMeterType + ", " : "")
				+ (sudutIV != null ? "sudutIV=" + sudutIV + ", " : "")
				+ (firmware != null ? "firmware=" + firmware + ", " : "")
				+ (alertLBKWH != null ? "alertLBKWH=" + alertLBKWH + ", " : "")
				+ (alertIT != null ? "alertIT=" + alertIT + ", " : "")
				+ (nilaiToken != null ? "nilaiToken=" + nilaiToken + ", " : "")
				+ (alertType != null ? "alertType=" + alertType + ", " : "")
				+ (powerStatus != null ? "powerStatus=" + powerStatus + ", "
						: "")
				+ (limitKredit != null ? "limitKredit=" + limitKredit + ", "
						: "")
				+ (pengulanganAlarm != null ? "pengulanganAlarm="
						+ pengulanganAlarm + ", " : "")
				+ (token1to5 != null ? "token1to5=" + token1to5 + ", " : "")
				+ (ne1to5 != null ? "ne1to5=" + ne1to5 + ", " : "")
				+ (rp1to5 != null ? "rp1to5=" + rp1to5 + ", " : "")
				+ (responseStatus != null ? "responseStatus=" + responseStatus
						+ ", " : "")
				+ (hexaMsg != null ? "hexaMsg=" + hexaMsg : "") + "]";
	}



	
}
